package gracker

class Project {
    String name
    String description
    Date dueDate
    String billingType
    String status
    static belongsTo = [owner : User]
    static hasMany = [tasks : Task]

    static constraints = {
        name blank: false, unique: true, size: 10..100
        description blank: false, maxSize: 999999
        dueDate nullable: false
        billingType inList: ['Hourly','Milestone','Non-billable']
        status inList: ['Completed', 'On Progress']
    }

    String toString (){
        "${name}"
    }
}
